﻿// 开发者:micropu
// 公司:佛山远钧智慧科技有限公司

using Elastic.Clients.Elasticsearch;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Admin.NET.Application.Entity;

/// <summary>
/// 设备通信日志
/// </summary>
[SugarTable("zj_DevicesLog", TableDescription = "设备通信日志")]
public class DevicesLog : EntityTenantBaseData
{
    /// <summary>
    /// 日志级别
    /// </summary>
    [SugarColumn(ColumnDescription = "日志级别", Length = 30)]
    public string LogLevel { get; set; }

    /// <summary>
    /// 日志类型 
    /// </summary>
    [SugarColumn(ColumnDescription = "日志类型")]
    public LogType LogType { get; set; }

    /// <summary>
    /// 日志信息
    /// </summary>
    [SugarColumn(ColumnDescription = "日志信息", ColumnDataType = StaticConfig.CodeFirst_BigString)]
    public string Name { get; set; }

    /// <summary>
    /// 客户端设备号
    /// </summary>
    [SugarColumn(ColumnDescription = "客户端设备号", Length = 200)]
    public string ClientSn { get; set; }

    /// <summary>
    /// 项目ID
    /// </summary>
    [SugarColumn(ColumnDescription = "项目ID")]
    public long ProjectId { get; set; }

    /// <summary>
    /// 所属项目
    /// </summary>
    [SugarColumn(IsIgnore = true)]
    [Navigate(NavigateType.OneToOne, nameof(ProjectId))] 
    public Project Project { get; set; }
}
